package org.carl.base.dingtalk.bot.bean;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

import java.util.List;

/**
 * @author Administrator
 */
@Data
public class DingTalkRobot {
    private List<DingTalkRobotVo> robot;

    public DingTalkRobotVo getDingTalkRobot(String id) {
        if (StrUtil.isBlank(id)) {
            return null;
        }
        return robot.stream().filter(ro -> StrUtil.equals(ro.getId(), id)).findFirst().orElse(null);
    }
}
